package cn.com.yang.datastruct.graph;

/**
 * 有向图拓扑实现，逆序，数组从尾巴往头放，最下生成树 TODO
 * 
 * @author yangyijin
 * @since 2024年2月7日-下午4:54:24
 */
public class GraphTuopoMain {
	public static void main(String[] args) {
		GraphTuopo graph = new GraphTuopo();
		graph.insert('A');// 0
		graph.insert('B');// 1
		graph.insert('C');// 2
		graph.insert('D');// 3
		graph.insert('E');// 4
		graph.insert('F');// 5
		
		graph.addEdge(0, 1);
		graph.addEdge(1, 2);
		graph.addEdge(2, 3);
		graph.addEdge(3, 4);
		graph.addEdge(4, 5);
		graph.addEdge(0, 5);
		graph.addEdge(1, 5);
		graph.addEdge(1, 3);
		graph.addEdge(3, 5);
		graph.tuopo();
	}
}
